<%@page import="dao.MngClass"%>
<%@page import="beans.ClassBean"%>
<%@page import="beans.Account"%>
<%@page import="dao.CheckAccount"%>
<%@page import="java.util.List"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Create Assignment Page</title>
    </head>
    <body>
        <%
            if (request.getAttribute("msg") != null) {
        %>
        <font color="green" ><%= request.getAttribute("msg")%></font><br>
        <% }
            if (request.getAttribute("error") != null) {
        %>
        <font color="red" > <%= request.getAttribute("error")%> </font>
        <%
            }
        %>
        <form action="createAssign" method="get">       
            <table>
                <tr>
                    <td></td>
                    <td>  Add new Assignment</td>
                </tr>
                <tr>
                    <td> Assignment Name</td>
                    <td> <input type="text" name="assign_name" value=""><font color="red">*</font></td>
                </tr>               

                <tr>
                    <td> Create Date</td>
                    <td>  <input type="date" name="create_date" value=""></td>
                </tr>
                <tr>
                    <td> Finish Date</td>
                    <td>  <input type="date" name="finish_date" value=""></td>
                </tr>                         
                <tr>
                    <td> Class</td>
                    <td>  <% MngClass mngClass = new MngClass();
                        %>
                        <%= mngClass.getClassName(request.getAttribute("class_id").toString())%>
                        <input type="hidden" name="class_id" value="<%= request.getAttribute("class_id").toString()%>">                                               
                    </td>
                </tr>                
                <tr>
                    <td></td>
                    <td> <input type="submit" value="Create"></td>
                </tr>
            </table>
        </form>
    </body>
</html>
